home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / or.z / or
Encoding:
Text File  |  1998-10-30  |  3.9 KB  |  102 lines

  1. OR(3M)                                                 Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      OORR - Computes logical sum
  6.  
  7. SSYYNNOOPPSSIISS
  8.      OORR (([II==]_i,,[JJ==]_j))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      OORR is an elemental function for the CF90 compiler.
  18.  
  19.      _a_r_g, _i, or _j can be of type Boolean, integer, real, logical, or Cray
  20.      pointer.
  21.  
  22. NNOOTTEESS
  23.      This is an outmoded routine for the CF90 compiler.  Refer to the
  24.      _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905, for
  25.      information about outmoded features and their preferred standard
  26.      alternatives.
  27.  
  28.      The name of this intrinsic cannot be passed as an argument.
  29.  
  30. CCAAUUTTIIOONNSS
  31.      Unexpected results can occur when Boolean functions are declared
  32.      external and then used with logical arguments.  The external Boolean
  33.      functions always treat their arguments as type Boolean and return a
  34.      Boolean result on UNICOS and UNICOS/mk systems.  On IRIX systems, they
  35.      return an integer result.
  36.  
  37. RREETTUURRNN VVAALLUUEESS
  38.      When given two arguments of type logical, OORR computes a logical sum
  39.      and returns a logical result.
  40.  
  41.      When given two arguments of type integer, real, Boolean, or pointer,
  42.      OORR computes a bit-wise logical sum and returns a Boolean result.  No
  43.      type conversion occurs.
  44.  
  45.      The following tables show both the logical sum and bit-wise logical
  46.      sum:
  47.  
  48.      -----------------------------------------------------------------
  49.         Logical        Logical           (Logical Variable 1) OORR
  50.       Variable 1     Variable 2           (Logical Variable 2)
  51.      -----------------------------------------------------------------
  52.            T              T                         T
  53.            T              F                         T
  54.            F              T                         T
  55.            F              F                         F
  56.      -----------------------------------------------------------------
  57.  
  58.  
  59.      --------------------------------------------------------------
  60.      Bit of        Bit of        (Bit of Variable 1) OORR
  61.      Variable 1    Variable 2    (Bit of Variable 2)
  62.      --------------------------------------------------------------
  63.           1             1                        1
  64.           1             0                        1
  65.           0             1                        1
  66.           0             0                        0
  67.      --------------------------------------------------------------
  68.  
  69. EEXXAAMMPPLLEESS
  70.      The following section of Fortran code shows the OORR function used with
  71.      two arguments of type logical:
  72.  
  73.           LOGICAL L1, L2, L3
  74.           ...
  75.           L3 = OR(L1,L2)
  76.  
  77.      The following section of Fortran code shows the OORR function used with
  78.      two arguments of type integer.  The bit patterns of the arguments and
  79.      result are also shown.  For clarity, only the rightmost 8 bits are
  80.      shown.
  81.  
  82.    INTEGER I1, I2, I3
  83.    I1 = 12
  84.    I2 = 10
  85.    ...
  86.    I3 = OR(I1,I2)
  87.  
  88.        -------------------------------     -------------------------------
  89.       | 0 |   |   |   |   |   |   |   |   | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
  90.        -------------------------------    -------------------------------
  91.                      I1                               I2
  92.  
  93.                      -------------------------------
  94.                     | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
  95.                     -------------------------------
  96.                                     I3
  97.  
  98. SSEEEE AALLSSOO
  99.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  100.      printed version of this man page.
  101.  
  102.